/**
 * 
 */
package cn.softTank.BpelModelImpl;

import org.dom4j.DocumentHelper;
import org.dom4j.Element;

import cn.softTank.BpelModel.Copy;
import cn.softTank.BpelModel.From;
import cn.softTank.BpelModel.To;

/**
 * @author Yuzone
 * 
 */
public class CopyImpl implements Copy {

	private From from;
	private To to;

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#getFrom()
	 */
	@Override
	public From getFrom() {
		return from;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#getIgnoreMissingFromData()
	 */
	@Override
	public Boolean getIgnoreMissingFromData() {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#getKeepSrcElementName()
	 */
	@Override
	public Boolean getKeepSrcElementName() {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#getTo()
	 */
	@Override
	public To getTo() {
		return to;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#isSetIgnoreMissingFromData()
	 */
	@Override
	public boolean isSetIgnoreMissingFromData() {
		// TODO Auto-generated method stub
		return false;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#isSetKeepSrcElementName()
	 */
	@Override
	public boolean isSetKeepSrcElementName() {
		// TODO Auto-generated method stub
		return false;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#setFrom(cn.softTank.BpelModel.From)
	 */
	@Override
	public void setFrom(From value) {
		from = value;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.softTank.BpelModel.Copy#setIgnoreMissingFromData(java.lang.Boolean)
	 */
	@Override
	public void setIgnoreMissingFromData(Boolean value) {
		// TODO Auto-generated method stub

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#setKeepSrcElementName(java.lang.Boolean)
	 */
	@Override
	public void setKeepSrcElementName(Boolean value) {
		// TODO Auto-generated method stub

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#setTo(cn.softTank.BpelModel.To)
	 */
	@Override
	public void setTo(To value) {
		to = value;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#unsetIgnoreMissingFromData()
	 */
	@Override
	public void unsetIgnoreMissingFromData() {
		// TODO Auto-generated method stub

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.Copy#unsetKeepSrcElementName()
	 */
	@Override
	public void unsetKeepSrcElementName() {
		// TODO Auto-generated method stub

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.XmlAdapt#toElement()
	 */
	@Override
	public Element toElement() {
		Element copy = DocumentHelper.createElement("copy");
		if (from != null) {
			copy.add(from.toElement());
		}
		if (to != null) {
			copy.add(to.toElement());
		}
		return copy;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.softTank.BpelModel.XmlAdapt#toXml()
	 */
	@Override
	public String toXml() {
		// TODO Auto-generated method stub
		return null;
	}

}
